Improve code block highlighting #56
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR brings the improvement for the block highlighting.
Screen.Recording.2025-12-18.at.15.35.33.mov
To highlight only the text without highlighting the entire line with background, use the following
highlightshortcode:Where:
class="hl-text-only"– the class that is used in the code theme to apply the appropriate styles.lang– the code language.hl_lines=10 19– the lines that should be highlighted.To highlight the full line, use:
The full guide will be added in the
AUTHORING.md.Also, this PR increases the required Hugo version that will also be updated in the main website. It is needed to fix the TOC rendering if the headings contains links.